<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.7.1.min.js"></script>

    <style>

        .root{
             color: red;
             width: 200px;

             height: 200px;
        }
    </style>
</head>
<body>
    
    <div class="root"></div>

    <script>
        $(".root").mouseover(function(){
            console.log("鼠标进入元素");
            
        })

        $(".root").mouseout(function(){
            console.log("鼠标移除元素")
        })
    </script>
</body>
</html>